<!--  -->
<template>
  <div>
   {{ obj.title }}
  父组件
   <DemoCom @sendTo="getData" :user="user" msg="hello"></DemoCom>
  </div>
</template>

<script lang='ts' setup>
import DemoCom from '../components/DemoCom.vue';
import { reactive,toRefs,ref,onMounted} from 'vue'

const user=ref({
  name:"zs",
  mobile:"135"
})
let obj=ref<any>({});

const getData=(val:any)=>{
  obj.value=val;
}
</script>
<style scoped>
</style>